<meta content="telephone=no" name="format-detection" />
<title>{$sys_name} - 我的投资记录</title>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/css/plugins/treeview/bootstrap-treeview.css" rel="stylesheet">
    <!-- Bootstrap -->
    <link href="/css/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/css/reset.css" rel="stylesheet">
    <link href="/css/css/style.css" rel="stylesheet">

    <script src="/js/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="/js/js/respond.js" type="text/javascript"></script>
    <script src="/js/js/common.js" type="text/javascript"></script>
    <script src="/js/js/bootstrap-datetimepicker.min.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="bg">
<!--头部-->
<include file="Public/Home/Pubheader.html" />
<section class="wrapper" style="padding:0">
    <!--左侧导航-->
    <include file="Public/Home/Menu.html" />

    <div class="content-area">
        <div class="t80"></div>
        <div class="z_top">
            <div class="location">
                <img src="images/location.png" alt="">
                <span>{$lang.ur_here}：我的投资记录</span>
            </div>
        </div>
        <div class="content">
            <div class="main_top bq_bg">
                <div class="font18 f2">
                    <img src="images/top_icon3.png" alt="">

                        <p style="margin-top: 10px;width: 70%">
                            理财收益：<span>{$lc_sy}</span><em>{$B}</em>
                        </p>

                </div>
            </div>
            <div class="zj_tab" style="padding-bottom: 10px;position: relative">
                <div class="zj1">
                    <ul>
                        <a href="{:U('User/mykj')}">
                            <li <if condition="$status eq 0">class="zj_cur" </if>>{$lang.all}</li>
                        </a>
                        <a href="{:U('User/mykj',array('status'=>1))}"  style="display: none">
                            <li <if condition="$status eq 1">class="zj_cur" </if>>矿机模式</li>
                        </a>
                        <a href="{:U('User/mykj',array('status'=>2))}"  style="display: none">
                            <li <if condition="$status eq 2">class="zj_cur" </if>>理财模式</li>
                        </a>
                    </ul>
                </div>

                <form action="{:U('User/mykj')}"  method="post" name="myform" style="display: none">
                <div class="zj2">
                    <p class="zj2_text">{$lang.cxrq}</p>
                    <p class="zj2_date">
                        <input type="text" id="startDate" name="reservatTime" value="{$start_time}" readonly class="form_datetime">
                        <span>-</span>
                        <input type="text" id="endDate" name='leaveTime' value="{$end_time}"  readonly class="form_datetime">
                    </p>
                    <p class="zj2_btn">
                        <input type="hidden" name="status" class="btn_zj" value="{$status}">
                        <input type="submit" class="btn_zj" value="">
                    </p>
                </div>
                </form>

            </div>
            <div class="clear"></div>
            <div class="fx_tab">
                <div class="table-responsive block_tab1 ">
                    <table>
                        <tr>
                            <if condition="$is_mobile neq 1">
                                <th>订单号</th>
                            </if>
                            <th>名称</th>
                            <th>{$lang.money}({$B})</th>
                            <if condition="$is_mobile neq 1">
                                <th>周期</th>
                            </if>
                            <th>收益</th>
                            <th style="display: none">利率</th>
                            <if condition="$is_mobile neq 1">
                                <th>购买时间</th>
                                <th>类型</th>
                                <th style="display: none">释放本金</th>
                            </if>
                            <th>周期</th>
                            <th style="display: none">状态</th>
                            <th style="display: none">操作</th>
                        </tr>

                        <foreach name="kjlist" item="item">
                            <tr class="tab_bg">
                                <if condition="$is_mobile neq 1">
                                    <td><if condition="$item.type eq 1">KJ{$item.kjtime}<else/>LC{$item.kjtime}</if></td>
                                </if>
                                <td>{$item.name}</td>
                                <td>{$item.price}</td>
                                <if condition="$is_mobile neq 1">
                                    <td>{$item.cycle}天</td>
                                </if>
                                <td>{$item.day_num}/天</td>
                                <td style="display: none">{$item.lilv}%</td>
                                <if condition="$is_mobile neq 1">
                                    <td>{:date('Y-m-d H:i:s',$item[addtime])}</td>
                                    <td>
                                        <if condition="$item.type eq 1">矿机模式<else/>理财模式</if>
                                    </td>
                                    <td style="display: none">
                                        <if condition="$item.shifang eq 1">是<else/>否</if>
                                    </td>
                                </if>
                                <td>
                                   已运行{$item.yunxing}/{$item.cycle}
                                </td>
                                <td style="display: none">
                                    <if condition="$item.status eq 0">收益中<else/>已到期</if>
                                </td>
                                <td style="display: none">
                                    <if condition="$is_mobile eq 1"><a onclick="check_fk({$item.id})">详情</a></if>
                                    <if condition="$item.status eq 0">
                                        <if condition="$item.shifang eq 1">
                                            <a onclick="tui({$item.id},{$item.tqsf})" style="color:#0dae8d">退本金</a>
                                            <else/>
                                            <a>不可退</a>
                                        </if>
                                            <else/>
                                            已结束
                                    </if>
                                </td>
                            </tr>
                            <div class="msg_box ggxq" id="fknr_{$item.id}" style="min-height: auto;display: none;bottom: 30px;">
                                <h3>产品详情</h3>
                                <div class="tab-content" >
                                    <div id="" class="tab-pane active">
                                        <div class="full-height-scroll">
                                            <div class="table-responsive" style="padding-bottom: 10px;padding-left: 5px">
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">订单号：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    <if condition="$item.type eq 1">KJ{$item.kjtime}<else/>LC{$item.kjtime}</if>
                                                </div>
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">名称：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    {$item.name}
                                                </div>
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">价格：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    {$item.price}LTC
                                                </div>
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">周期：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    {$item.cycle}天
                                                </div>
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">利率：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    {$item.lilv}%
                                                </div>
                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">类型：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    <if condition="$item.type eq 1">矿机模式<else/>理财模式</if>
                                                </div>

                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">释放本金：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    <if condition="$item.shifang eq 1">是<else/>否</if>
                                                </div>

                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">购买时间：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    {:date('Y-m-d H:i:s',$item[addtime])}
                                                </div>

                                                <div class="fk_ban fk_ban1" style="width: 25%;margin: 10px 0;line-height:auto">状态：</div>
                                                <div style="width: 70%;float: left;margin: 10px 0;word-break: break-all">
                                                    <if condition="$item.status eq 0">收益中<else/>已到期</if>
                                                </div>

                                                <div style="width: 100%;float: left">
                                                    <div style="width: 80px;margin: auto;line-height: 30px;text-align: center;background: #0dae8d;color: #fff;margin-top: 20px;cursor: pointer" onclick="close_fk({$item.id})">关闭</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </foreach>
                    </table>
                </div>
            </div>
            <script>
                function check_fk(id){
                    $("#fknr_"+id).show();
                }

                function close_fk(id){
                    $("#fknr_"+id).hide();
                }
            </script>
            <!--分页-->
            <input type="hidden" id="page_url" value="mykj&status={$status}">

            <div style="line-height: 30px;float: right;margin-top: 20px" class="pages">
                <ul>
                    <li style="width: 20%;float: left;text-align: center;cursor: pointer;list-style-type: none;"><a onclick="page_up()">上一页</a></li>
                    <li style="width: 25%;float: left;text-align: center;font-size: 14px;list-style-type: none;">
                        <if condition="$count eq 0 ">0
                            <else/>
                            <input type="text" onchange="gopage({$page_all})" id="gopage" value="{$page}" style="width: 40%;border: none;background: none;text-align: right;line-height: 30px;font-size: 15px;padding-bottom: 5px;padding-right: 5px">
                        </if>
                        /{$page_all}
                    </li>
                    <li style="width: 20%;float: left;text-align: center;cursor: pointer;list-style-type: none;"><a onclick="page_down({$page_all})">下一页</a></li>
                    <li style="width: 35%;float: left;text-align: center;font-size: 14px;list-style-type: none;">共{$count}条记录</li>
                </ul>
            </div>
            <script type="text/javascript">
                var page_url = document.getElementById("page_url").value;
                function gopage(page_all){
                    var url = window.location.href;
                    var status = getQueryString('status');
                    var n=(url.split('&status='+status)).length;
                    if(n==2){
                        var url = url.replace("&status="+status,"");
                    }

                    var a = getQueryString('a');
                    url = changeURLPar(url, 'a', page_url);
                    var page = document.getElementById("gopage").value;
                    if(page <= page_all){
                        url = changeURLPar(url, 'page', page);
                        window.location.href = url
                    }else{
                        url = changeURLPar(url, 'page', page_all);
                        window.location.href = url
                    }
                }
                //下一页
                function page_down(page_all){
                    var url = window.location.href;
                    var status = getQueryString('status');
                    var n=(url.split('&status='+status)).length;
                    if(n==2){
                        var url = url.replace("&status="+status,"");
                    }
                    var page = getQueryString('page');
                    var a = getQueryString('a');
                    url = changeURLPar(url, 'a', page_url);
                    if(page_all > 1 && page == null){
                        window.location.href = url+"&page=2"
                    }else{
                        if(page < page_all){
                            page = Number(page) + Number(1);
                            url = changeURLPar(url, 'page', page);
                            window.location.href = url
                        }else{
                            window.location.href = url
                        }

                    }
                }
                //上一页
                function page_up(){
                    var url = window.location.href;
                    var status = getQueryString('status');
                    var n=(url.split('&status='+status)).length;
                    if(n==2){
                        var url = url.replace("&status="+status,"");
                    }
                    var page = getQueryString('page');
                    var a = getQueryString('a');
                    url = changeURLPar(url, 'a', page_url);
                    if(page == 1 || page == null){
                        window.location.href = url
                    }else{
                        page = Number(page) - Number(1);
                        url = changeURLPar(url, 'page', page);
                        window.location.href = url
                    }
                }
                //改url参数  destinv = url   par = 要改的参数  par_value = 新参数值
                //url = changeURLPar(url, 'page', page);
                function changeURLPar(destiny, par, par_value)
                {
                    var pattern = par+'=([^&]*)';
                    var replaceText = par+'='+par_value;
                    if (destiny.match(pattern))
                    {
                        var tmp = '/\\'+par+'=[^&]*/';
                        tmp = destiny.replace(eval(tmp), replaceText);
                        return (tmp);
                    }
                    else
                    {
                        if (destiny.match('[\?]'))
                        {
                            return destiny+'&'+ replaceText;
                        }
                        else
                        {
                            return destiny+'?'+replaceText;
                        }
                    }
                    return destiny+'\n'+par+'\n'+par_value;
                }

                //获取参数值   name=参数名
                //var page = getQueryString('page');
                function getQueryString(name) {
                    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                    var r = window.location.search.substr(1).match(reg);
                    if (r != null) return unescape(r[2]); return null;
                }

            </script>

        </div>

    </div>
</section>
<script type="text/javascript">
    function tui(id,tqsf){
        if(confirm("提前退本金将扣除本金的"+tqsf+"%，确定要这么做吗？")){
            window.location.href = "{:U('User/tui')}"+"&id="+id;
        }
    }
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/js/js/bootstrap.js"></script>
<script type="text/javascript" language="javascript">
    var nav1 = document.getElementById("nav1");
    var links1 = nav1.getElementsByTagName("li");
    var lilen1 = nav1.getElementsByTagName("a");
    var currenturl1 = document.location.href;
    var last1 = 0;
    for (var i1=0;i1<links1.length;i1++)
    {
        var linkurl1 = lilen1[i1].getAttribute("href");
        if(currenturl1.indexOf(linkurl1)!=-1)
        {
            last1 = i1;
        }
    }

    links1[last1].className = "cur1";

</script>
</body>
</html>
